package top.csjss.hospital.exception;

import top.csjss.hospital.enums.HospitalExceptionEnums;

/**
 * @Author ztf
 * @Date 19:13 2021/10/15
 **/
public class HospitalException extends RuntimeException{
    private Integer code;

    public HospitalException(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public HospitalException(HospitalExceptionEnums enums) {
        super(enums.getMsg());
        this.code= enums.getCode();
    }

    public Integer getCode() {
        return code;
    }
}
